<?php 
session_start();
require_once("include/authen.php");
require_once("include/ui.php");
echo headerPage("Point of Sale [History]");
?>
<SCRIPT src="js/js_poshistory.js"></SCRIPT> 
 <script>
$(function() {

	$( "#txtDateFrom" ).datepicker({ dateFormat: 'dd/mm/yy',
		showOn: "button",
		buttonImage: "images/Calendar.png",
		buttonImageOnly: true });
				
	$( "#txtDateTo" ).datepicker({ dateFormat: 'dd/mm/yy',
		showOn: "button",
		buttonImage: "images/Calendar.png",
		buttonImageOnly: true });
		
	$("#btnPrint").live('click',function(){
		$("#normal-screen").hide();
		$("#page-header").hide();
		$("#searchdata").hide();
		$(".toolbar-box").hide();
		$("#foolter_table").hide();
		$("#leftboder").hide();
		$("#rightboder").hide();
		window.print();
		
		$("#normal-screen").show();
		$("#page-header").show();
		$("#searchdata").show();
		$(".toolbar-box").show();
		$("#foolter_table").show();
		$("#leftboder").show();
		$("#rightboder").show();
	});	
});
</script>
<FORM name="Act" id="Act" action="pos_history_d.php" method="POST"> 
<INPUT type=hidden value="" id="ibr" name="ibr"> 
<INPUT type=hidden value="" id="ipos" name="ipos"> 
<INPUT type=hidden value="" id="view" name="view"> 

<table width="1024" id='leftboder' border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="10" style='border-left:2px solid #facb0c;'>&nbsp;</td>
    <td width="1004" valign="top">
        <div class="content-box">
            <div Class="toolbar-box">   
                <div class="t">
                    <div class="t">
                        <div class="t"></div>
                    </div>
                 </div>
                 <div class="m">
                    <div class="toolbar">
                        <table class="toolbar">
                        <tr>
							<td><a href="javascript:void('0');" id="btnBack">
								<span class="icon_back"></span>Back
								</a>
							</td>
							 <td>
								<a href="javascript:void('0');" title="Print" id="btnPrint">
								<span class="icon_Print"></span>Print
								</a>
							</td>							
						</tr>
                        </table>
                    </div>
                      <div class="header" style="background-image: url(images/todo.png);">
						History - Point of Sale 
                      </div>
                <div class="clr"></div>
                 </div>
                 <div class="b">
                    <div class="b">
                        <div class="b"></div>
                    </div>
                 </div>
            </div>
               <div id="element-box">
                <div class="t">
					<div class="t">
						<div class="t"></div>
					</div>
				</div>
                <div class="m">
				  <table width="100%" id='searchdata'>
					<?php  if ($_SESSION['branchtype'] =="3"){ ?>
						<tr>
							<td width="15%" class="fontSearch" style="padding-left:20">
								Branch Name : 
							</td>
							<td width="85%" align=left >
								<select id="cboBranch" style="width:15em;"></select>
							</td>
						</tr>
					<?php  }?>
                    <tr>
                            <td width="10%" class="fontSearch" style="padding-left:20">
                           Sale Date : 
                            </td>
							<td width="90%" align=left >
								<input id="txtDateFrom"  title="Filter by Date " type="text" size=10 name="txtDateFrom" class="boxItem" />
								&nbsp;- <input id="txtDateTo"  title="Filter by  Date " type="text" size=10 name="txtDateTo" class="boxItem" />
							</td>
                    </tr>			 
						 <tr><td/><td>
						 <a href="javascript:void('0');" id="btnSearch"><img src="./images/btn-search.gif" border=0/></a> </td></tr>
						 <tr><td colspan="2"></tr>
                    </table>
                    <table cellspacing="1" id="resultData" class=list>
                    <thead>
                       <tr>
								<th width="4%" >No.</th>
								<th style="display:none">id</th>
								<th style="display:none">Branchid</th>
								<th class="title" width="20%" style="display:none">Branch</th>
								<th class="title" width="10%" >Dated Sale</th>
								<th  class="title" width="10%"  nowrap="nowrap">Total Amount</th>
								<th  class="title" width="10%"  nowrap="nowrap">Total Discount</th>
								<th  class="title" width="10%"  nowrap="nowrap">Total Net</th>
								<th  class="title" width="10%"  nowrap="nowrap">Total Payment</th>
								<th  class="title" width="10%"  nowrap="nowrap">Remain Amount</th>
								<th  class="title" width="5%"  nowrap="nowrap">Product </th>
								<th  class="title" width="5%"  nowrap="nowrap">Customer</th>
                      </tr>
                    </thead>
                   <tbody>
                   </tbody>
                   <tfoot>
                         <tr>
							<td colspan="11">
									<div class="boxfooter">
									<div id="paging_btn">  </div> 
								 <div class="totalpage">Total : <span id="rowCount">0</span>&nbsp;&nbsp;rows</div>
								 
								 </div>
								 
							</td>
                         </tr>
                     </tfoot>
                    </table>
                  <div class="clr"></div>
                </div>
                 <div class="b"><div class="b"><div class="b"></div></div></div>
                 <div class="clr"></div>
                </div> <!-- elementbox-->
        </div>
    </td>
    <td width="10" id='rightboder' style='border-right:2px solid #facb0c;'>&nbsp;</td>
    
  </tr>
</table>
 </FORM>
<?php 
echo footer();
?>